<?php
// 引入 数据库工具
require_once("DButil.php");

$sql = "";
// 执行sql

$arr = [
    "success" => true,
    "msg" => "查询成功",
    "data" => [
        ["name" => "aaa", "value" => 10],
        ["name" => "xxx", "value" => 20],
        ["name" => "ff", "value" => 11],
        ["name" => "gg", "value" => 5]
    ]
];

header("Access-Control-Allow-Origin:*");
header("Content-Type:application/json;charset=UTF-8");
echo json_encode($arr);
?>